<?php $this->load->view('layout/header'); ?>
    <div id="container">
        <!--查询表单开始-->
        <div id="DivQuery">
            <div id="floatBoxBg" style="filter: alpha(opacity=0); opacity: 0;">
            </div>
            <div id="floatBox" class="floatBox">
                <div id="drag" class="title" onmousedown="DragDialog()">
                    <h4>
                        查询</h4>
                    <span>关闭</span></div>
                <div class="content">
                    <form action="<?php echo b_url('config/sysmodule')?>" method="post">
                    <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_query">
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                模块名称：
                            </td>
                            <td>
                                <input name="modulename" type="text" id="txtModuleName" />
                            </td>
                            <td style="width: 15%" align="right">
                                模块标识：
                            </td>
                            <td>
                                <input name="modulevalue" type="text" id="txtModuleValue" />
                            </td>
                        </tr>
                        <tr class="table_query_row">
                            <td style="width: 15%" align="right">
                                状态：
                            </td>
                            <td colspan="3">
                               <span id="radIsClose">
                                    <input id="radIsClose_0" type="radio" name="isclose" value="" checked="checked" /><label for="radIsClose_0">不限</label>
                                    <input id="radIsClose_1" type="radio" name="isclose" value="0" /><label for="radIsClose_1">开放</label>
                                    <input id="radIsClose_2" type="radio" name="isclose" value="1" /><label for="radIsClose_2">关闭</label>
                                </span>   
                            </td>
                        </tr>
                        <tr class="table_query_btn">
                            <td align="right" style="width: 15%">
                            </td>
                            <td>
                                <input type="submit" value="查询" onclick="javascript:WebForm_DoPostBackWithOptions(new WebForm_PostBackOptions(&quot;btnQuery&quot;, &quot;&quot;, false, &quot;&quot;, &quot;SysModule.aspx?ParentID=0&quot;, false, false))" id="btnQuery" />
                                <input type="button" value="返回" onclick="javascript:HiddenSearchDialog();" />
                            </td>
                            <td align="right" style="width: 15%">
                            </td>
                            <td>
                            </td>
                        </tr>
                    </table>
                    </form>
                </div>
            </div>
        </div>
        <!--查询表单结束-->
        <?php
            $last_parentid = 0;
            $modulename = '';
            foreach ($node_list as $k => $v) {
                $modulename = ' > ' . $v['modulename'] . '  ';
                $last_parentid =$v['parentid'];
            }
        ?>
        <!--操作选项开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_op">
            <tr>
                <td>
                    操作选项：
                    <a href="<?php echo b_url('config/sysmodule_add?parentid=').$sysmoduleid?>">添加模块</a>
                    <a onclick="javascript:return checkEdit(this);" name="sysmoduleid" href="javascript:;)" src="<?php echo b_url('config/sysmodule_add/')?>">修改模块</a>
                    <a onclick="javascript:return checkDel(this);" name="sysmoduleid" id="lbtnDel" href="javascript:;" src="<?php echo b_url('config/delete_info/sysmodule/sysmoduleid/sysmodule/')?>">删除模块</a>
                    <a onclick="javascript:return checkOperate(this);" name="sysmoduleid" href="javascript:;" src="<?php echo b_url('config/edit_close/sysmodule/sysmoduleid/sysmodule/0/')?>">批量开放</a>
                    <a onclick="javascript:return checkOperate(this);" name="sysmoduleid" href="javascript:;" src="<?php echo b_url('config/edit_close/sysmodule/sysmoduleid/sysmodule/1/')?>">批量关闭</a>
                    <a onclick="javascript:return checkEdit(this);" name="sysmoduleid" href="javascript:;" src="<?php echo b_url('config/move/')?>">移动模块</a>
                    <a href="javascript:SearchDialog()">查询模块</a>
                    <a href="<?php echo b_url('config/sysmodule?parentid=').$last_parentid;?>">
                    <span id="lblNav">根结点</span>
                    <?php echo $modulename;?>
                    </a>
                </td>
            </tr>
        </table>
        <!--操作选项结束-->
        <!--列表开始-->
        <table width="100%" border="0" cellpadding="0" cellspacing="0" class="table_list" id="TbList">
            <tr class="table_list_title">
                <td style="width: 2%">
                    <input type="checkbox" name="checkbox" value="checkbox" onclick="javascript:checkAll(this,'sysmoduleid')" />
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=SysModuleID&AscDesc=desc&txtModuleName=&txtModuleValue=&txtModuleIco=&txtModuleUrl=&txtComment=&txtSysLimitIDs=&ParentID=0&txtChildNum=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    编号
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=ModuleName&AscDesc=desc&txtModuleName=&txtModuleValue=&txtModuleIco=&txtModuleUrl=&txtComment=&txtSysLimitIDs=&ParentID=0&txtChildNum=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    模块名称
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=ModuleValue&AscDesc=desc&txtModuleName=&txtModuleValue=&txtModuleIco=&txtModuleUrl=&txtComment=&txtSysLimitIDs=&ParentID=0&txtChildNum=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    模块标识
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=ModuleIco&AscDesc=desc&txtModuleName=&txtModuleValue=&txtModuleIco=&txtModuleUrl=&txtComment=&txtSysLimitIDs=&ParentID=0&txtChildNum=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    显示图标
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=ModuleUrl&AscDesc=desc&txtModuleName=&txtModuleValue=&txtModuleIco=&txtModuleUrl=&txtComment=&txtSysLimitIDs=&ParentID=0&txtChildNum=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    管理URL
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=Comment&AscDesc=desc&txtModuleName=&txtModuleValue=&txtModuleIco=&txtModuleUrl=&txtComment=&txtSysLimitIDs=&ParentID=0&txtChildNum=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    备注
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=ChildNum&AscDesc=desc&txtModuleName=&txtModuleValue=&txtModuleIco=&txtModuleUrl=&txtComment=&txtSysLimitIDs=&ParentID=0&txtChildNum=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    下级数
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=ListID&AscDesc=desc&txtModuleName=&txtModuleValue=&txtModuleIco=&txtModuleUrl=&txtComment=&txtSysLimitIDs=&ParentID=0&txtChildNum=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    排序号<img src="../Themes/Images/up.gif"/>
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AdminID&AscDesc=desc&txtModuleName=&txtModuleValue=&txtModuleIco=&txtModuleUrl=&txtComment=&txtSysLimitIDs=&ParentID=0&txtChildNum=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    创建人
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=AddTime&AscDesc=desc&txtModuleName=&txtModuleValue=&txtModuleIco=&txtModuleUrl=&txtComment=&txtSysLimitIDs=&ParentID=0&txtChildNum=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    创建时间
                </td>
                <td style="width: 10%" onclick="javascript:GoTo('?OrderKey=IsClose&AscDesc=desc&txtModuleName=&txtModuleValue=&txtModuleIco=&txtModuleUrl=&txtComment=&txtSysLimitIDs=&ParentID=0&txtChildNum=&txtListID=&txtAdminID=&txtAddTime=&drpIsClose=&page=1')" title="点击排序">
                    状态
                </td>
                <td style="width: 10%">
                    操作
                </td>
            </tr>
                <?php foreach($list as $k=>$v) :?>
                    <tr class="table_list_row_normal">
                        <td style="width: 2%">
                            <input name="sysmoduleid" type="checkbox" id="SysModuleID" value="<?php echo $v['sysmoduleid']?>" onclick="javascript:TrColor2('SysModuleID',1)" />
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('SysModuleID',1)">
                            <?php echo $v['sysmoduleid']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('SysModuleID',1)">
                            <?php echo $v['modulename']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('SysModuleID',1)">
                            <?php echo $v['modulevalue']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('SysModuleID',1)">
                            <?php echo $v['moduleico']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('SysModuleID',1)">
                            <?php echo $v['moduleurl']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('SysModuleID',1)">
                            <?php echo $v['comment']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('SysModuleID',1)">
                            <?php echo $v['childnum']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('SysModuleID',1)">
                            <?php echo $v['listid']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('SysModuleID',1)">
                            <?php echo $v['adminname']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('SysModuleID',1)">
                            <?php echo $v['addtime']?>
                        </td>
                        <td style="width: 10%" onclick="javascript:TrColor('SysModuleID',1)">
                            <?php 
                                if($v['isclose'] == 0){
                                    echo '开放';
                                }elseif($v['isclose'] == 1){
                                    echo '<font color="red">关闭</font>';
                                }
                            ?>
                        </td>
                        <td style="width: 10%">
                            <a href="<?php echo b_url('config/sysmodule?parentid=').$v['sysmoduleid'];?>">管理子模块</a>
                        </td>
                    </tr>
                <?php endforeach ; ?>
        </table>
        <!--列表结束-->
        <!--分页开始-->
        <?php $pagination->show();?>
        <!--分页结束-->
    </div>
<script src="/static/bk/js/table.js" type="text/javascript"></script>
<?php $this->load->view('layout/footer'); ?>

